<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户列表案例</title>
    <script src="vue.js"></script>

</head>
<body>
<div id="div">
    <table border="1px" cellspacing="0" width="150px" color>
        <tr v-for="(s,index) in students">
            <td>{{index+1}}</td>
            <td>{{s.name}}</td>
            <td>{{s.age}}</td>
        </tr>
    </table>
</div>
</body>
<script>
    new Vue({
        el:"#div",
        data:{
            students:[
                {
                    name:"张三",
                    age:20
                },
                {
                    name:"张三",
                    age:20
                },
                {
                    name:"张三",
                    age:20
                }
            ]
        }
    });
</script>
</html>